package com.chinasofti.io;

import java.io.File;
import java.io.IOException;

public class Demo04 {

    public static void main(String[] args) throws IOException {

        //当前模块下创建java.txt文件
        File f1 = new File("java0418\\java.txt");
        //System.out.println(f1.createNewFile());
        //删除当前模块下创建java.txt文件
        //System.out.println(f1.delete());

        //在当前模块下创建changxin文件夹
        File f2 = new File("java0418\\changxin");
        //System.out.println(f2.delete());

        //在当前模块下创建目录changxin 在该目录下创建java.txt
        File f3  = new File("java0418\\changxin");
        //System.out.println(f3.mkdir());
        File f4  = new File("java0418\\changxin\\java.txt");
        //System.out.println(f4.createNewFile());

        //删除当前模块的目录changxin

        System.out.println(f4.delete());
        System.out.println(f3.delete());
    }
}
